#include "Shm.hpp"
#include "common.hpp"
#include <unistd.h>

void test()
{
    Shm shm(PATH, CREATER);
    Server server(PATH, FILENAME);

    char* str = (char*)shm.virtualAddr();

    while (server.receive() > 0)
    {
        std::cout << str << std::endl;
        sleep(1);
    }
}

int main()
{
    test();
    
    return 0;
}
